package cn.hn3l.agriculture.services.servicesImplements.goods;

import cn.hn3l.agriculture.dao.mapper.goods.ProductorMapper;
import cn.hn3l.agriculture.entitis.goods.Productor;
import cn.hn3l.agriculture.services.interfaces.goods.ProviderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by weiwei02 on 2016/10/19.
 */
@Service("providerService")
public class ProviderServiceImpl implements ProviderService {
    @Resource
    private ProductorMapper productorMapper;
    @Override
    public List<Productor> getProductorsOfPage(int page) {
        List<Productor> productors = productorMapper.findAllProductors();
        return productors;
    }

    @Override
    public Productor getProductorById(int productorId) {
        return productorMapper.findById(productorId);
    }
}
